
import React from 'react';
import router from 'umi/router';
import Link from 'umi/link';

import styles from './users.css';

class users extends React.Component {
  render() {
    const listArr: any[] = ['1111', '2222', '3333', '4444', '5555', '6666'];
    const listItems = listArr.map((name, key) =>
      (
        <p key={key} className={styles.list}>
          <Link to={{ pathname: `/users/:${name}`, query: { from: 'users' } }}>{name}</Link>
        </p>
      ))
    return (
      <div className={styles.normal}>
        <h1>Page users/users</h1>
        <section>{listItems}</section>
        <button className={styles.list}><Link to={{ pathname: "/" }}>go back</Link></button>
      </div>
    );
  }
}

export default users;
